/**
 * Copyright (C) 2025 pony working team
 * SPDX-License-Identifier: MulanPSL-2.0
 */

/* define to prevent recursive inclusion -------------------------------------*/
#ifndef __SYS_FCNTL_H__
#define __SYS_FCNTL_H__

/* includes (standard library, system) ---------------------------------------*/
/* includes (other library) --------------------------------------------------*/
/* includes (project) --------------------------------------------------------*/
/* includes (local) ----------------------------------------------------------*/

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* defines -------------------------------------------------------------------*/

#define O_RDONLY   (0x0000)
#define O_WRONLY   (0x0001)
#define O_RDWR     (0x0002)
#define O_APPEND   (0x0008)
#define O_CREAT    (0x0200)
#define O_TRUNC    (0x0400)
#define O_EXCL     (0x0800)
#define O_SYNC     (0x2000)
#define O_NONBLOCK (0x4000)
#define O_NOCTTY   (0x8000)

#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)

/* typedefs ------------------------------------------------------------------*/
/* macro ---------------------------------------------------------------------*/
/* inlines -------------------------------------------------------------------*/
/* externs -------------------------------------------------------------------*/

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __SYS_FCNTL_H__ */
